<script setup lang="ts">

withDefaults(defineProps<{
   title?: string
   leftText?: string
   rightText?: string
   leftArrow?: boolean
}>(), {
   leftArrow: true,
});

const emits = defineEmits<{
   (e: "click-left"): void
   (e: "click-right"): void
}>();

const handleClickLeft = () => {
   emits("click-left");
};

const handleClickRight = () => {
   emits("click-right");
};

</script>

<template>
   <van-nav-bar :title="title" :left-text="leftText" :right-text="rightText" :left-arrow="leftArrow" @click-left="handleClickLeft" @click-right="handleClickRight"></van-nav-bar>
</template>
